<?php

declare(strict_types=1);

namespace App\Request;

use Hyperf\Validation\Request\FormRequest;

class storePointPositionRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        return [
            'name' => 'required|string',
            'category_id' => 'required',
            'district_id' => 'required',
            'description' => 'required|string',
            'address' => 'required|string',
            'lng' => 'required',
            'lat' => 'required'
        ];
    }

    public function messages(): array
    {
        return [
            'name' => '点位名称',
            'category_id' => '分类id',
            'district_id' => '区县id',
            'description' => '点位简介',
            'address' => '地址',
            'lng' => '地图经度坐标',
            'lat' => '地图纬度坐标'
        ];
    }
}
